<%-- 
    Document   : sessionos
    Created on : Mar 9, 2011, 9:21:06 AM
    Author     : matusz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
             Integer hiddenszam=null;
             if ( (request.getParameter("hiddenszam")!=null)&&(!request.getParameter("hiddenszam").isEmpty()) ){
               hiddenszam = Integer.parseInt(request.getParameter("hiddenszam"));
             }

             if (hiddenszam==null) hiddenszam = new Integer(0);

             String muvelet = (String) request.getParameter("muvelet");
             if (muvelet!=null){

              if (muvelet.equals("Csokkent")){

                  hiddenszam--;

              }
              if (muvelet.equals("Novell")){

                 hiddenszam++;

              }
              if (muvelet.equals("Nullaz")){

                 hiddenszam=0;

              }
              
            }
        
        %>

         <h1>Hiddenes</h1>
         <br /><br />
         <form action="">

            <input type="hidden"  name="hiddenszam" value="<%=hiddenszam%>" />

            <input type="submit" name="muvelet" value="Csokkent" />
            <input type="submit" name="muvelet" value="Novell" />
            <input type="submit" name="muvelet" value="Nullaz" />
        </form>
         <br/><br/>
         Hidden:  <%=hiddenszam %>
    </body>
</html>
